package asteroids.model;

/**
 * @version	1.0
 * @author 	Ewoud Van Esch & Jomi Verwimp
 */
public class HorBound implements WorldObject {

	/**
	 * @param	other
	 * @effect	other.resolve(this)
	 */
	@Override
	public void collide(WorldObject other) {
		other.resolve(this);
	}
	
	/**
	 * @param	| other
	 * @effect	| other.resolve(this)
	 */
	@Override
	public void resolve(Ship other) {
		other.resolve(this);
	}

	/**
	 * @param	| other
	 * @effect	| other.resolve(this)
	 */
	@Override
	public void resolve(Asteroid other) {
		other.resolve(this);
	}

	/**
	 * @param	| other
	 * @effect	| other.resolve(this)
	 */
	@Override
	public void resolve(Bullet other) {
		other.resolve(this);
	}

	/**
	 * @param	| hb
	 * @throws	IllegalArgumentException
	 * 			| true //TODO juist?
	 */
	@Override
	public void resolve(HorBound hb) 
			throws IllegalArgumentException {
		throw new IllegalArgumentException("Two boundaries cannot collide, so cannot resolve!");
	}

	/**
	 * @param	| vb
	 * @throws	IllegalArgumentException
	 * 			| true //TODO juist?
	 */
	@Override
	public void resolve(VerBound vb)
			throws IllegalArgumentException {
		throw new IllegalArgumentException("Two boundaries cannot collide, so cannot resolve!");
	}

}
